package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiD_day_profit;

//DAO
public interface D_day_profitMapperBase {

	// 根据id查看
	@Select("SELECT * FROM d_day_profit  WHERE DPROFITID = #{dprofitid}")
	public ApiD_day_profit findD_day_profitById(Integer dprofitid);

	// 查看数据集
	@Select("SELECT * FROM D_day_profit")
	public List<ApiD_day_profit> findD_day_profits();

	// 根据条件查看数据集
	public List<Map<String, Object>> findD_day_profitsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO d_day_profit (USER_ID, STATUS, RETURNPROFITPEOPLE, MONEY, CREATE_TIME, DESCRIPTION, TYPE, RADICES, THENPERCENT) VALUES (#{user_id}, #{status}, #{returnprofitpeople}, #{money}, #{create_time}, #{description}, #{type}, #{radices}, #{thenpercent})")
	@Options(useGeneratedKeys = true, keyProperty = "dprofitid")
	public int insertD_day_profit(ApiD_day_profit d_day_profit);

	// 修改
	@Update("UPDATE d_day_profit SET USER_ID = #{user_id}, STATUS = #{status}, RETURNPROFITPEOPLE = #{returnprofitpeople}, MONEY = #{money}, CREATE_TIME = #{create_time}, DESCRIPTION = #{description}, TYPE = #{type}, RADICES = #{radices}, THENPERCENT = #{thenpercent} WHERE DPROFITID = #{dprofitid}")
	public int updateD_day_profit(ApiD_day_profit d_day_profit);

	// 删除
	@Delete("DELETE FROM d_day_profit  WHERE DPROFITID = #{dprofitid}")
	public int deleteD_day_profit(Integer dprofitid);

	// Foreign keys revelant

	// region Indexs revelant

}
